<?php

/**
 * videomap actions.
 *
 * @package    sf_sandbox
 * @subpackage videomap
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class videomapActions extends sfActions
{
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
	/*
	 * 	  $videos = Doctrine_Query::create()->from('Video v')
	  			->where('v.youtube_id = ? and v.title= ?', array('id video', 'titolo') )
	  			->execute();
	  			
	  			->fetchOne();
	  			
	     foreach ($videos as $video) {
	       echo $video->getTitle();
	     }
	 */
	
	
	
  public function executeIndex(sfWebRequest $request)
  {
    $this->form = new VideoForm();
    
    if ($request->getMethod() == sfWebRequest::POST) {
      $this->form->bind($request->getParameter('video'));
      if ($this->form->isValid()) {
        $this->form->save();
      }
    }
  }
}
